package com.ygq.xiaodi.mapper;

import com.ygq.xiaodi.domain.Video;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public class VideoMapper {
    private static Map<Integer, Video> videoMap = new HashMap<>();
    static {
        videoMap.put(1, new Video(1,"JAVA基础课程:jdk8~13新特性"));
        videoMap.put(2, new Video(2,"Springboot2.x"));
        videoMap.put(3, new Video(3,"微服务Springcloud"));
        videoMap.put(4, new Video(4,"Springboot微信支付"));
        videoMap.put(5 , new Video(5,"小滴课堂面试专题第一季"));
    }

    public List<Video> listVideo(){
        List<Video> list = new ArrayList<>();
        list.addAll(videoMap.values());
        return list;
    }
}
